let baseUrl = "https://route.showapi.com";
const http = (obj) => {
   return new Promise((resolve, reject) => {
        wx.request({
            url: baseUrl + obj.url,
            data: obj.data || {},
            method: obj.method || "GET",
            header: obj.header || {
                "content-type": "application/json"
            },
            success: (res) => {
                console.log(res)
                resolve(res)
            },
            faile: (error) => {
                reject(error)
            }
        })
    })
}
export default http